package com.example.controller;

import com.example.controller.bak.BaseClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j  //用于添加日志
@RestController
@RequestMapping("/books")
public class BookController  {
    //创建记录日志的对象
    @GetMapping
    public String getById(){
        System.out.println("springboot is running......");
        log.info("info.....");
        log.debug("debug...");
        log.error("error...");
        log.warn("warn...");
        return "springboot is running......";
    }
}
